// Package coding_round_1 28-9
// @Title coding_round_1
// @Description
// @Author  == 琳琳也叫王木木 ==  2021-11-16 19:38
// @Create  2021-11-16 19:38
package coding_round_1

import "fmt"

func Test28() {
	fmt.Println(reverseInteger(1))
}

func isPalindrome(x int) bool {
	if x < 0 {
		return false
	}
	if x == reverseInteger(x) {
		return true
	}
	return false
}

func reverseInteger(x int) int {
	if x <= 0 {
		return 0
	}
	var num = 0
	for x > 0 {
		i := x % 10
		x = x / 10
		num = num*10 + i*10
	}
	return num / 10
}
